package com.graduate.config;

import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.io.File;

/**
 * @description: bbb
 * @author: 赵波
 * @createtime :2020-04-24 10:32:15
 **/
public class MvcConfigure implements WebMvcConfigurer {
    @Override
    public  void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/images/**").addResourceLocations("file:"+new File("/images").getAbsolutePath()+File.separator);
    }
}
